import request from '@/utils/request'

// 查询企业的部门列表
export function getDepartmentsList() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}

// 查询企业的部门列表
export function removeDepartments(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}

// 新增部门
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}

// 根据id 查询部门
export function getDepartmentsById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'GET'
  })
}

// 根据id修改部门详情

export function editDepartmentsById(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'PUT',
    data
  })
}
